public class MethodDemo09 {
    public static void main(String[] args) {
        long start = System.currentTimeMillis();
        for (int i = 0; i <= 1000; i++) {
            for (int j = 0; j <= 1000; j++) {
                int k = 1000 - i - j;
                if (i * i + j * j == k * k) {
                    System.out.println(i + "--" + j + "--" + "k");
                }

//                for (int k = 0; k <= 1000; k++) {
//                    if (i + j + k == 1000 && i * i + j * j == k * k) {
//                        System.out.println(i + "--" + j + "--" + "k");
//                    }
//                }
            }
        }
        long end = System.currentTimeMillis();
        System.out.println(end - start);
    }

}


